<div class="inviteNewParticipants wrapper">
    {% if url is not defined %}
        {% set url = path('app_public_conference',{'confId':room.name}) %}
    {% endif %}

    <div class="toggle conference-icon" id="inviteButtonOpenRoom">
        <i class="fa fa-user-plus"></i>
    </div>
    <div class="content text-center {%  if app.user and app.user == room.moderator %}show{% endif %}" id="inviteButtonOpenRoomContent">
        <div class="close" id="inviteButtonOpenRoomClose">
            <i class="fa fa-times"></i>
        </div>
        <h3>{{ 'public.invite.more'|trans }}</h3>
        <hr>
        {{ 'public.invite.text'|trans }}

        <div class="input-group mb-3">
            <input
                    type="text"
                    class="form-control"
                    placeholder="Recipient's username"
                    aria-label="Recipient's username"
                    aria-describedby="button-addon2"
                    value="{{ httpsAbolutUrl(url,room is defined?room:null) }}"
                    disabled="disabled"
            />
            <button class="btn btn-outline-primary copyLink"
                    type="button" id="button-addon2"
                    data-mdb-ripple-color="dark"
                    data-clipboard-text="{{ httpsAbolutUrl(url,room is defined?room:null) }}"
            >
                <i class="fa-regular fa-copy"></i>
            </button>
        </div>


        <!-- Buttons trigger collapse -->

        <a
                class="text-white caretdown after"
                data-mdb-collapse-init
                href="#collapseExample"
                role="button"
                aria-expanded="false"
                aria-controls="collapseExample"
        >
            {{ 'public.invite.moreApps'|trans }}
        </a>

        <!-- Collapsed content -->
        {% set text %}

            {% include('public_conference/publicInviteText.html.twig') with{'room':room, 'url':url} %}

        {% endset %}


        <div class="collapse mt-3" id="collapseExample">
            <div class="d-flex justify-content-between">
                <input class="d-none" value="{{ text }}" id="einladungsemail">
                <a class="text-white copyLink" data-clipboard-text="{{ text }}"><i
                            class="fa-regular fa-copy"></i> </a>
                <a class="text-white"
                   href="mailto:?subject={{ 'Einladung zur Videokonferenz'|trans|url_encode }}&body={{ text|url_encode }}"
                   target="_blank">
                    <i class="fa-regular fa-envelope"></i>
                </a>
                <a class="text-white"
                   href="https://mail.google.com/mail/?view=cm&fs=1&su={{ 'Einladung zur Videokonferenz'|trans|url_encode }}&body={{ text|url_encode }}"
                   target="_blank"><i class="fa-brands fa-google"></i></a>
                <a class="text-white"
                   href="https://outlook.office.com/mail/deeplink/compose?subject={{ 'Einladung zur Videokonferenz'|trans|url_encode }}&body={{ text|url_encode }}"
                   target="_blank"><i class="fa-brands fa-windows"></i> </a>
                <a class="text-white"
                   href="https://compose.mail.yahoo.com/?To=&Subj={{ 'Einladung zur Videokonferenz'|trans|url_encode }}&Body={{ text|url_encode }}"
                   target="_blank"><i class="fa-brands fa-yahoo"></i></a>
            </div>
        </div>
        <hr>
        {% if getJigasiNumber(room) %}
            <b>{{ 'email.sip.text'|trans }}</b><br>
            <spacer size="18"></spacer>
            <b>{{ 'email.sip.number'|trans }}:</b><br>
            {% for key,n in getJigasiNumber(room) %}
                {% for number in n %}
                    {% if room.server.jigasiApiUrl is not null %}
                        <p>
                            <small>({{ key }}) {{ number }} {{ 'email.sip.pin'|trans }}
                                : {{ getJigasiPin(room)|addRepetiveCharacters(' ',3) }}#
                                <button class="btn btn-outline-primary "
                                        type="button" id="button-addon2"
                                        data-mdb-ripple-color="dark"
                                        data-clipboard-text="{{ number }},,,,{{ getJigasiPin(room) }}#"
                                >
                                    <i class="fa-regular fa-copy"></i>
                                </button>
                            </small>
                        <p>
                        <br>
                    {% elseif  room.callerRoom %}
                        <p><small>({{ key }}) {{ number }} {{ 'email.sip.pin'|trans }}
                                : {{ room.callerRoom.callerId |addRepetiveCharacters(' ',3) }}#
                                <a href="#" data-clipboard-text="{{ number }},,,,{{ room.callerRoom.callerId }}#"
                                   class="text-white copyLink">

                                    <i class="fa-regular fa-copy"></i>
                                    </a>
                            </small>
                        </p>
                        <br>
                    {% endif %}
                {% endfor %}
            {% endfor %}
        {% endif %}
    </div>

</div>